#include<bits/stdc++.h>
using namespace std;
inline int read(){
	int x=0;bool f=0;char ch=getchar();
	while(ch<'0'||ch>'9')f^=(ch=='-'),ch=getchar();
	while('0'<=ch&&ch<='9')x=(x<<1)+(x<<3)+(ch^48),ch=getchar();
	return f?-x:x;
}
int n,m;
int main(){srand(time(0));
	freopen("talk.in","w",stdout);
	n=500;m=449;
	printf("%d %d\n",n,m);
	for(int i=1;i<=n;i++){
		int a=rand()%1000+1,b=rand()%1000+1;
		printf("%d %d\n",a,b);
	}
	return 0;
}

